let request = (methd,url)=>{
    return new Promise((reslove,reject)=>{
        let xhr = new XMLHttpRequest();
        xhr.open(methd,url);
        xhr.send();
        xhr.onreadystatechange = ()=>{
            if(xhr.readyState === 4){
                let data = JSON.parse(xhr.response);
                reslove(data)
            }
        }
    })
}